<?php
header('Content-type:application/json');
$lun=[];
$arr=[];
$tu1=[];
$tu2=[];
$main1=[];
$main2=[];
$main3=[];
$main4=[];
require('init.php');

$sql="SELECT * FROM main_lun"; //0
$result=mysqli_query($conn,$sql);
while(true){
    $row=mysqli_fetch_assoc($result);
    if(!$row){
        break;
    }
    $lun[]=$row;
}
$arr[]=$lun; 
//��ҳ��������ͼƬ
$sql="SELECT * FROM main_tu1"; //1
$result=mysqli_query($conn,$sql);
while(true){
    $row=mysqli_fetch_assoc($result);
    if(!$row){
        break;
    }
    $tu1[]=$row;
}
$arr[]=$tu1; 
//ͼƬ����   ��������
$sql="SELECT * FROM main_c1"; //2
$result=mysqli_query($conn,$sql);
while(true){
    $row=mysqli_fetch_assoc($result);
    if(!$row){
        break;
    }
    $main1[]=$row;
}
$arr[]=$main1;

//���ſ�Ѷ�ֲ�

$sql="SELECT * FROM main_lun1"; //3
$result=mysqli_query($conn,$sql);
while(true){
    $row=mysqli_fetch_assoc($result);
    if(!$row){
        break;
    }
    $main2[]=$row;
}
$arr[]=$main2;

//���ſ�Ѷ����

$sql="SELECT * FROM main_c3"; //4
$result=mysqli_query($conn,$sql);
while(true){
    $row=mysqli_fetch_assoc($result);
    if(!$row){
        break;
    }
    $main3[]=$row;
}
$arr[]=$main3;

//������������

$sql="SELECT * FROM main_c4"; //5
$result=mysqli_query($conn,$sql);
while(true){
    $row=mysqli_fetch_assoc($result);
    if(!$row){
        break;
    }
    $main4[]=$row;
}
$arr[]=$main4;

//��ҳ��������ͼƬ
$sql="SELECT * FROM main_tu2"; //6
$result=mysqli_query($conn,$sql);
while(true){
    $row=mysqli_fetch_assoc($result);
    if(!$row){
        break;
    }
    $tu2[]=$row;
}
$arr[]=$tu2;








echo json_encode($arr);